package mma;

import com.manager.book.BookManager;
import org.w3c.dom.ls.LSOutput;

import java.util.Scanner;

public class Score {
    Scanner input =new Scanner(System.in);
   private shuru[] stushuru;
   public void init(){
       stushuru=new shuru[4];
       for(int i=0;i<4;i++){
       System.out.println("请输入第"+(i+1)+"个学生的信息和成绩");
       System.out.println("姓名：");
       String name = input.next();
           System.out.println("语文：");
           int yuwen= input.nextInt();
           System.out.println("数学：");
           int math = input.nextInt();
           System.out.println("英语：");
           int english = input.nextInt();
           int sum =yuwen+math+english;
           stushuru[i].setName(name);
           stushuru[i].setYuwenScore(yuwen);
           stushuru[i].setMathScore(math);
           stushuru[i].setEnglishScore(english);
           stushuru[i].setSum(sum);
       }
//       if (stushuru[i])
////       for (int i=0;i<4;i++){
////       System.out.println( stushuru[i].getName()+stushuru[i].getYuwenScore()+"总分："+stushuru[i].getSum());
////       }
   }

    public static void main(String[] args) {
        Score sh =new Score();
        sh.init();
    }
}
